import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import './plugins/vant'
import './plugins/element'
import 'element-ui/lib/theme-chalk/index.css'
import Scroller from '@/components/scroller'
import Loading from '@/components/loading'
axios.interceptors.response.use(data => {
  let res = data.data
  return res
})
Vue.prototype.$axios = axios
Vue.filter('formatImg', function (imgUrl, arg) {
  let newImgUrl = imgUrl.replace(/w\.h/, arg)
  return newImgUrl
})
Vue.component('my-scroller', Scroller)
Vue.component('my-loading', Loading)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
